
{extend name='admin@public/content'}
{block name="content"}
<!-- 表单搜索 开始 -->
<form autocomplete="off" class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
        <div class="layui-input-inline">
            <input name="sn" value="{$Think.get.sn|default=''}" placeholder="输入订单号查找" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <div class="layui-input-inline">
            <input name="shop" value="{$Think.get.shop|default=''}" placeholder="输入店铺名称查询" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <div class="layui-input-inline">
            <input name="name" value="{$Think.get.name|default=''}" placeholder="输入用户账号查询" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <div class="layui-input-inline">
            <select name="type" class="layui-select">
                <option value="">订单状态</option>
                {foreach($list['type'] as $k=>$v)}
                {if $Think.get.type eq $k and $Think.get.type!=''}
                <option selected="selected" value="{$k}">{$v}</option>
                {else}
                <option value="{$k}">{$v}</option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">时 间</label>
        <div class="layui-input-inline">
            <input name="created_at" id='create_at' value="{$Think.get.created_at|default=''}" placeholder="关注时间" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
</form>
<script>
    window.laydate.render({range: true, elem: '#range-date'});
</script>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="true" method="post">
    <!--{empty name='list'}-->
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    <!--{else}-->
    <input type="hidden" value="resort" name="action">
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='text-left nowrap'>历史订单原价</th>
            <th class='text-left nowrap'>当前页订单原价</th>
            <th class='text-left nowrap'>历史订单实际付款</th>
            <th class='text-left nowrap'>当前页订单实际付款</th>
            <th class='text-left nowrap'>历史订单服务费</th>
            <th class='text-left nowrap'>当前页订单服务费</th>
            <th class='text-left nowrap'>历史订单税金</th>
            <th class='text-left nowrap'>当前页订税金</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td class='text-left nowrap'>
                {$list.all_real_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.real_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.all_otal_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.total_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.all_service_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.service_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.all_tax_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$list.tax_price|default='0'}
            </td>
        </tr>
        </tbody>
    </table>
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='text-left nowrap'>交易店铺 </th>
            <th class='text-left nowrap'>用户账户</th>
            <th class='text-left nowrap'>订单号</th>
            <th class='text-left nowrap'>手机号</th>
            <th class='text-left nowrap'>下单时间</th>
            <th class='text-left nowrap'>订单原价</th>
            <th class='text-left nowrap'>实际付款</th>
            <th class='text-left nowrap'>服务费</th>
            <th class='text-left nowrap'>税金</th>
            <th class='text-left nowrap'>微信订单号</th>
            <th class='text-left nowrap'>订单状态</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        <tbody>
        {foreach($list['list'] as $key=>$value)}
        <tr>
            <td class='text-left nowrap'>
               {$value.name}
            </td>
            <td class='text-left nowrap'>
                {$value.username|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.sn|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.tel|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.created_at|default='暂无'}
            </td>

            <td class='text-left nowrap'>
                {$value.real_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$value.total_price|default='0'}
            </td>
            <td class='text-left nowrap'>
                {$value.service_price|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.tax_price|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.alipay_trade_no|default='暂无'}
            </td>
            <td class='text-left nowrap'>
                {$value.statusName|default='暂无'}
            </td>
            <td class='text-center nowrap'>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("admin/Admincapitalwater/index")}?sn={$value.sn}'>订单跟踪</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-open='{:url("$classuri/edit")}?id={$value.id}'>查看详情</a>
                <span class="text-explode">|</span>
                <a class="layui-btn layui-btn-xs layui-btn-normal" data-title="查看备注" data-modal='{:url("$classuri/lookremarks")}?id={$value.id}'>查看备注</a>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($list.page)}<p>{$list.page|raw}</p>{/if}
    <!--{/empty}-->
</form>
{/block}
{block name="script"}
<!--表单初始化-->
<script>
    window.laydate.render({range: true, elem: '#create_at'});
    window.form.render();
</script>
<!--引入标签设置-->
{/block}